<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>修改管理员</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css">
<link href="__PUBLIC__/css/font-awesome.css" rel="stylesheet">
<script src="__PUBLIC__/js/jquery.min.js"></script>
<style type="text/css">
.autoflow-x {
	overflow-x: auto;
}
</style>
</head>
<body>
<!-- 修改赛事 -->
<div class="changeMatch">
	<div class="autoflow-x">
		<table class="table">
			<tr style="background-color: #F2F3F7;">
				<th>账号</th>
				<th>密码</th>
				<th>类型</th>
				<th>操作</th>
			</tr>
			<volist name="manager_list" id="vo">
			<tr>
				<form action="" method="post">
					<td class="changeabled">
						<div>{$vo.mn_user}</div>
						<input type="text" value="{$vo.mn_user}" style="display: none;" name="user" maxlength="14"/>
					</td>
					<td class="changeabled">
						<span>{$vo.mn_password}</span>
						<input type="text" value="{$vo.mn_password}" style="display: none;" name="password" maxlength="14"/>
						<input type="hidden" value="{$vo.mn_id}" name="id">
					</td>
					<td>
						<span class="changeabl">
							<if condition="$vo.auth_id eq 1">检录管理员
								<elseif condition="$vo.auth_id eq 2"/>比赛管理员
								<elseif condition="$vo.auth_id eq 3"/>成绩公布管理员
								<else />超级管理员
							</if>
						</span>
						<select class="form-control myselect" name="auth" style="display:none;">
							<option value="1">检录管理员</option>
							<option value="2">比赛管理员</option>
							<option value="3">成绩公布管理员</option>
							<option value="4">超级管理员</option>
						</select>
					</td>
					<td>
						<input type="button" class="btn btn-danger" value="修改" onclick="changeMatch($(this))" />
						<input type="submit" class="btn btn-info" value="提交"  />
						<a class="btn btn-danger"  href="__URL__/delete_manager/id/{$vo.mn_id}" onclick="confirmj()">删除</a>
					</td>
				</form>
			</tr>
			</volist>
		</table>
	</div>
</div>
<script type="text/javascript">
	function changeMatch(obj){
		obj.parent().parent().find("td.changeabled *").css("display","none");
		obj.parent().parent().find("td.changeabled input").show();
		$('.myselect').css('display','inline');
		$('.changeabl').css('display','none');
	}
	function confirmj(){
		var r = confirm("你确定吗？");
		if (r == true) {
			alert("ok");
		}
		if (r == false) {
			return false;
		}
	}
</script>
</body>
</html>